//
//  PersonRes.m
//  Taste
//
//  Created by 徐昊 on 16/9/10.
//  Copyright © 2016年 徐昊. All rights reserved.
//

#import "PersonRes.h"

@implementation PersonRes

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"con"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            PersonCon *con = [PersonCon modelWithDic:dic];
            [array addObject:con];
        }
        _con = array;
    }
    if ([key isEqualToString:@"id"]) {
        _personRes_id = value;
    }
}

+ (NSDictionary *)objectClassInArray{
    return @{@"con" : [PersonCon class]};
}

@end